package cn.tedu.spring.config;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: Miyako
 * @Date: 2024-08-03-10:49
 * @Description:
 */
@Configuration//设置为配置类，优先加载
@ComponentScan("cn.tedu.spring")//指定扫描路径，扫描所有带有@Component注解类
public class SpringConfig {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);

    }

}
